@extends('layouts.mobile_main')

@section('title', '订单详情')

@section('resources')
    @parent
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <link rel="stylesheet" href="{{ env('CSS_DOMAIN') }}css/public.css?v={{env('CSS_VERSION')}}">
    <script src="{{ env('JS_DOMAIN') }}/js/adaptation.js?v={{env('JS_VERSION')}}"></script>
@endsection

@section('content')
<div class="paysu_outer">
	<header class="pay_detail oh" style="background-color: #fff;">
		<a class="fl" href="javascript:history.go(-1);">
		<img class="fl" src="{{env('IMAGE_DOMAIN')}}images/back_p.png?v={{env('IMAGE_VERSION')}}" alt=""></a>
		<span class="fl co_violet fz_48">买单消费详情</span>
	</header>
	<section class="paysu_center">
		<div class="oh paysu_sjxq">
			<p class="fz_92" style="text-align: center;margin: 0.2rem 0 0.1rem;">-{{$orderamount}}</p>
			<p class="fz_48" style="text-align: center;">本次消费帮您节省了<span class="co_violet">{{$orderamount/2}}元</span></p>
		</div>
		<div class="oh paysu_sjxq">
			<img class="fl" src="{{env('IMAGE_DOMAIN')}}{{$shop['logo']}}" alt="">
			<div class="fl pay_sjxqtext">
				<h2 class="fz_44">{{$shopname}}</h2>
				<p class="fz_34 co_gray">电话：<span>{{$shop['contactnumber']}}</span></p>
				<p class="fz_28 co_gray" style="width: 6.3rem;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">地址：<span>{{$shop['address']}}</span></p>
			</div>
		</div>
		<!-- <ul class="paysu_xfxx">
			<li class="oh fz_40">
				<p class="fl">消费金额</p>
				<span class="fr">{{$orderamount}}</span>
			</li>
			<li class="oh fz_40">
				<p class="fl">手续费</p>
				<span class="fr">10</span>
			</li>
			<li class="oh fz_40">
				<p class="fl">红包</p>
				<span class="fr">-{{$redenvelopeamount}}</span>
			</li>
			<li class="oh fz_40">
				<p class="fl">实付金额</p>
				<span class="fr">{{$actualamount}}</span>
			</li>
		</ul> -->
		<ul class="paysu_xfxx">
			<li class="oh fz_40">
				<p class="fl">支付时间</p>
				<span class="fr">{{date('Y-m-d H:i', strtotime($created_at))}}</span>
			</li>
			<li class="oh fz_40">
				<p class="fl">消费金额</p>
				<span class="fr">{{$orderamount}}</span>
			</li>
			<li class="oh fz_40">
				<p class="fl">支付方式</p>
				<span class="fr">余额支付</span>
			</li>
			<li class="oh fz_40">
				<p class="fl">订单号</p>
				<span class="fr">{{$ordernumber}}</span>
			</li>
		</ul>
		<!-- @if(isset($comment))
            <div class="pay_evaluate">
                <div class="oh fz_44">
                    <p class="fl">我的评价</p>
                    <span class="co_orange fl" style="margin-left: 0.4rem;">{{$comment['score']}}分</span>
                    <span class="co_gray fr shouqi">展开</span>
                </div>
                <p class="fz_34 pay_evaluate_text" style="margin: 0.2rem 0;display: none;">{{$comment['content']}}</p>
                <div class="pay_evaluate_pic" style="display: none;">
                    @if(count($comment['picture'])>0)
                        @foreach($comment['picture'] as $pictureList)
                            <img style="width: 3rem;height: 2.1rem;" src="{{env('IMAGE_DOMAIN')}}{{$pictureList}}" alt="">
                        @endforeach
                    @endif
                </div>
            </div>
		@endif -->
	</section>
</div>
@endsection

@section('scriptResources')
    @parent
    <script>
	    window.onresize=function(){
		    pagesp();
	    }
	    $(function(){
		    var paysu_outer_h=$(window).height();
		    $(".paysu_outer").css({"min-height":paysu_outer_h});
		    var shouqi=false;
		    $(".shouqi").click(function(){
		    	if (shouqi) {
		    		$(".pay_evaluate_text").hide();
		    		$(".pay_evaluate_pic").hide();
		    		$(".shouqi").html("展开");
		    		shouqi=false;
		    	}else{
		    		$(".pay_evaluate_text").show();
		    		$(".pay_evaluate_pic").show();
		    		$(".shouqi").html("收起");
		    		shouqi=true;
		    	}
		    })
	    })
</script>
@endsection